package com.card323.crpg.shop;

import java.util.ArrayList;

import com.card323.crpg.item.Item;

public class Shop {
	ArrayList<Item> _items = new ArrayList<Item>();

	public Item get_item(int index) {
		return _items.get(index);
	}

	public String get_shop_items_info() {
		StringBuffer sb = new StringBuffer();
		sb.append("商店物品信息:\n");

		for (int index = 0; index < _items.size(); index++) {
			Item item = _items.get(index);
			sb.append((index + 1) + ":" + item._name + "\t|价格"+item.get_price()+"\t|"
					+ item.get_item_info() + "\n");
		}
		sb.append(get_shop_tips());
		return sb.toString();

	}

	private String get_shop_tips() {
		StringBuffer sb = new StringBuffer();
		sb.append("提示:输入 shop buy [i]以购买编号为[i]的商品 快捷指令sb[i]");
		return sb.toString();
	}

}
